using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml;

/// <summary>
/// Summary description for xmlCommon
/// </summary>
public class xmlCommon
{
    public static XmlDocument read(string sXMLFile)
    {
        XmlDocument kq = new XmlDocument();
        try
        {
            kq.Load(sXMLFile);
        }
        catch (Exception ex)
        {
            kq = null;
        }
        return kq;
    }
    public static DataSet readDataSet(string sXMLFile)
    {
        DataSet kq = new DataSet();
        try
        {
            kq.ReadXml(sXMLFile);
        }
        catch (Exception ex)
        {
            kq = null;
        }
        return kq;
    }
    public static bool write(XmlDocument xmlDoc, string sXMLFile)
    {
        bool kq = true;
        try
        {
            xmlDoc.Save(sXMLFile);
        }
        catch (Exception ex)
        {
            kq = false;
        }
        return kq;
    }
    public static bool writeDataSet(DataSet ds, string sXMLFile)
    {
        bool kq = true;
        try
        {
            ds.WriteXml(sXMLFile);
        }
        catch (Exception ex)
        {
            kq = false;
        }
        return kq;
    }

	public xmlCommon()
	{
		//
		// TODO: Add constructor logic here
		//
	}
}
